const router = require('koa-router')()
const {patchUserInfo} = require('../../controller/userInfo')

router.prefix('/api/userInfo')

router.patch('/userInfo', async (ctx, next) => {
  const {firstName, lastName, email, description, gender, picture, city} = ctx.request.body
  ctx.body = await patchUserInfo(ctx, {firstName, lastName, email, description, gender, picture, city})
})

module.exports = router
